package com.sinosoft.ebusiness.domain.elementManage;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.sinosoft.ebusiness.domain.elementManage.GePageviewItemEvent;
import com.sinosoft.ebusiness.domain.elementManage.GeProductPageViewItemId;
import com.sinosoft.ebusiness.domain.elementManage.GeTemplateGroup;

@Entity
@Table(name = "GE_PRODUCT_PAGE_VIEWITEM")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class GeProductPageViewItem implements Serializable {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 8654556524160550856L;

	/** 属性ID */
	private GeProductPageViewItemId id;

	/** 属性标的项目中文名称 */
	private String itemCName;

	/** 属性标的项目英文名称 */
	private String itemEName;

	/** 属性itemtname */
	private String itemtname;

	/** 属性项目代码 */
	private String itemType;

	/** 属性relevancetable */
	private String relevancetable;

	/** 属性selectcontent */
	private String selectcontent;

	/** 属性key */
	private String showKey;

	/** 属性保险价值 */
	private String showValue;

	/** 属性moreselect */
	private String moreselect;

	/** 属性险种代码 */
	private String riskCode;

	/** 属性审核状态 */
	private String status;

	/** 属性备注 */
	private String remark;

	/** 属性riskname */
	private String riskname;

	/** 属性dateformat */
	private String dateformat;
	
	/**	属性linkType 链接类型**/
	private String linkType;
	
	/**	属性linkAddress 链接地址**/
	private String linkAddress; 
	
	private GeTemplateGroup geTemplateGroup;
	
	/** 属性gePageviewItemEvents */
	private List<GePageviewItemEvent> gePageviewItemEvents = new ArrayList<GePageviewItemEvent>(0);

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "itemCode", column = @Column(name = "ITEMCODE")),
			@AttributeOverride(name = "templateCode", column = @Column(name = "TEMPLATECODE")),
			@AttributeOverride(name = "groupCode", column = @Column(name = "GROUPCODE")) })
	public GeProductPageViewItemId getId() {
		return id;
	}

	public void setId(GeProductPageViewItemId id) {
		this.id = id;
	}
	

	/**
	 * 属性标的项目中文名称的getter方法
	 */

	@Column(name = "ITEMCNAME")
	public String getItemCName() {
		return this.itemCName;
	}

	/**
	 * 属性标的项目中文名称的setter方法
	 */
	public void setItemCName(String itemCName) {
		this.itemCName = itemCName;
	}

	/**
	 * 属性标的项目英文名称的getter方法
	 */

	@Column(name = "ITEMENAME")
	public String getItemEName() {
		return this.itemEName;
	}

	/**
	 * 属性标的项目英文名称的setter方法
	 */
	public void setItemEName(String itemEName) {
		this.itemEName = itemEName;
	}

	/**
	 * 属性itemtname的getter方法
	 */

	@Column(name = "ITEMTNAME")
	public String getItemtname() {
		return this.itemtname;
	}

	/**
	 * 属性itemtname的setter方法
	 */
	public void setItemtname(String itemtname) {
		this.itemtname = itemtname;
	}

	/**
	 * 属性项目代码的getter方法
	 */

	@Column(name = "ITEMTYPE")
	public String getItemType() {
		return this.itemType;
	}

	/**
	 * 属性项目代码的setter方法
	 */
	public void setItemType(String itemType) {
		this.itemType = itemType;
	}

	/**
	 * 属性relevancetable的getter方法
	 */

	@Column(name = "RELEVANCETABLE")
	public String getRelevancetable() {
		return this.relevancetable;
	}

	/**
	 * 属性relevancetable的setter方法
	 */
	public void setRelevancetable(String relevancetable) {
		this.relevancetable = relevancetable;
	}

	/**
	 * 属性selectcontent的getter方法
	 */

	@Column(name = "SELECTCONTENT")
	public String getSelectcontent() {
		return this.selectcontent;
	}

	/**
	 * 属性selectcontent的setter方法
	 */
	public void setSelectcontent(String selectcontent) {
		this.selectcontent = selectcontent;
	}


	@Column(name = "SHOWKEY")
	public String getShowKey() {
		return showKey;
	}

	public void setShowKey(String showKey) {
		this.showKey = showKey;
	}

	@Column(name = "SHOWVALUE")
	public String getShowValue() {
		return showValue;
	}

	public void setShowValue(String showValue) {
		this.showValue = showValue;
	}

	/**
	 * 属性moreselect的getter方法
	 */

	@Column(name = "MORESELECT")
	public String getMoreselect() {
		return this.moreselect;
	}

	/**
	 * 属性moreselect的setter方法
	 */
	public void setMoreselect(String moreselect) {
		this.moreselect = moreselect;
	}

	/**
	 * 属性险种代码的getter方法
	 */

	@Column(name = "RISKCODE")
	public String getRiskCode() {
		return this.riskCode;
	}

	/**
	 * 属性险种代码的setter方法
	 */
	public void setRiskCode(String riskCode) {
		this.riskCode = riskCode;
	}

	/**
	 * 属性审核状态的getter方法
	 */

	@Column(name = "STATUS")
	public String getStatus() {
		return this.status;
	}

	/**
	 * 属性审核状态的setter方法
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * 属性备注的getter方法
	 */

	@Column(name = "REMARK")
	public String getRemark() {
		return this.remark;
	}

	/**
	 * 属性备注的setter方法
	 */
	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * 属性riskname的getter方法
	 */

	@Column(name = "RISKNAME")
	public String getRiskname() {
		return this.riskname;
	}

	/**
	 * 属性riskname的setter方法
	 */
	public void setRiskname(String riskname) {
		this.riskname = riskname;
	}

	/**
	 * 属性dateformat的getter方法
	 */

	@Column(name = "DATEFORMAT")
	public String getDateformat() {
		return this.dateformat;
	}

	/**
	 * 属性dateformat的setter方法
	 */
	public void setDateformat(String dateformat) {
		this.dateformat = dateformat;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "geProductPageViewItem")
	public List<GePageviewItemEvent> getGePageviewItemEvents() {
		return gePageviewItemEvents;
	}

	public void setGePageviewItemEvents(
			List<GePageviewItemEvent> gePageviewItemEvents) {
		this.gePageviewItemEvents = gePageviewItemEvents;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({
		@JoinColumn(name = "TEMPLATECODE", referencedColumnName = "TEMPLATECODE", insertable = false, updatable = false),
		@JoinColumn(name = "GROUPCODE", referencedColumnName = "GROUPCODE", insertable = false, updatable = false)
	})
	@JsonBackReference
	public GeTemplateGroup getGeTemplateGroup() {
		return geTemplateGroup;
	}

	public void setGeTemplateGroup(GeTemplateGroup geTemplateGroup) {
		this.geTemplateGroup = geTemplateGroup;
	}

	@Column(name = "LINKTYPE")
	public String getLinkType() {
		return linkType;
	}

	public void setLinkType(String linkType) {
		this.linkType = linkType;
	}

	@Column(name = "LINKADDRESS")
	public String getLinkAddress() {
		return linkAddress;
	}

	public void setLinkAddress(String linkAddress) {
		this.linkAddress = linkAddress;
	}

	
}
